/***
 * @date 2018-05-23
 * @author zhaocan
 * @desc  客服服务工单全部列表
 * */
//页面加载
$(function() {
    loadDataGrid();
});

//加载客服服务类工单全部列表数据
function loadDataGrid(){
    var columns = [[{field : 'idStr',title : '',hidden:true},
        {field : 'ck',checkbox:true},
        {field:'deal',title: '操作',align:'center',width: 150,formatter:function(value,rec,index){
                var ret="";
                ret='<a class="icon-line iconfont uce-edit" title="处理"  onclick="claimTask(\''+index+'\')" href="javascript:void(0)"></a>'
                return ret;
            }
        },
        {field:'postalComplaintsCode',title:'申诉编号',width:100,sortable:true,formatter: formatTip} ,
        {field:'complainant',title:'申诉人',width:100,formatter: formatTip},
        {field:'deadline',title:'剩余处理时长',width:100,formatter: formatTip},
        {field:'complainantTel',title:'联系方式',width:100, formatter: formatTip},
        {field:'waybillNum',title:'运单编号',align: 'center',width:140, formatter : formatTip},
        {field:'complainTime',title: '申诉日期', width: 30, formatter: formatTip},
        {field:'status',title:'工单状态',width:100, formatter: formatTip},
        {field:'pab',title:'转办局',width:100, formatter: formatTip},
        {field:'pabProvince',title:'转办局省份',align: 'center',width:140, formatter : formatTip},
        {field:'pabDate',title:'转办日期',width:100, formatter: formatTip},
        {field:'pabNum',title: '转办次数', width: 30, formatter: formatTip},
        {field:'controlType',title:'投诉类型',width:100, formatter: formatTip},
        {field:'complainReason',title:'申诉原因',align: 'center',width:140, formatter : formatTip},
        {field:'handler',title: '处理人', width: 30, formatter: formatTip},
        {field:'handlerTime',title:'处理时间',align: 'center',width:140, formatter : formatTip},
        {field:'satisficing',title:'满意度',align: 'center',width:140, formatter : formatTip},
        {field:'closingTime',title:'结案时间',align: 'center',width:140, formatter : formatTip},
        {field:'dutyBranch',title:'责任网点',align: 'center',width:140, formatter : formatTip},
        {field:'fineSum',title:'罚款金额',align: 'center',width:140, formatter : formatTip}
    ]];
    var dataGridParams = {
        url : G_CTX_PATH+'/cs/CsWoPostalComplaints/findToDoPostalCompByPage.do',
        pageSize : 10,
        toolbar : '#postalCompSerToClaim',
        singleSelect : 'true',
        fitColumns : 'true'
    }
    newloadGrid('dgPostalCompSerToClaim', columns, dataGridParams);
}

//查询
function findPostalCompSerToClaimData() {
    $('#dgPostalCompSerToClaim').datagrid('load', serializeFormObj("formFindPostalCompSerToClaim"));
}

//查询条件重置
function resetQueryForm(){
    $("#formFindPostalCompSerToClaim").form('reset');
}

//新增客服服务工单
function addPostalCompSer() {
    showWarnMsg("不要急，这就来!");
    openTabCrossDomainIcsSimple("postalCompSer_detail","客服服务类工单详情","/cs/PostalCompSer/detail/.do",false,0,portal_global_systemCode,false);
}
